<div id="div_view_options">
    <fieldset>
        <legend><?= __('Display GIS Visualization'); ?></legend>
        <div id="gis_div" style="position:relative;">
            <form method="post" action="tbl_gis_visualization.php">
                <?= PMA_URL_getHiddenInputs($url_params); ?>
                <label for="labelColumn">
                    <?= __("Label column"); ?>
                </label>
                <select name="visualizationSettings[labelColumn]" id="labelColumn" class="autosubmit">
                    <option value=""><?= __("-- None --"); ?></option>
                    <?php foreach ($labelCandidates as $value): ?>
                        <option value="<?= htmlspecialchars($value); ?>" <?= ($value == $visualizationSettings['labelColumn'] ? 'selected="selected"' : ''); ?>>
                            <?= htmlspecialchars($value); ?>
                        </option>
                    <?php endforeach; ?>
                </select>
                <label for="spatialColumn">
                    <?= __("Spatial column"); ?>
                </label>
                <select name="visualizationSettings[spatialColumn]" id="spatialColumn" class="autosubmit">
                    <?php foreach ($spatialCandidates as $value): ?>
                        <option value="<?= htmlspecialchars($value); ?>" <?= ($value == $visualizationSettings['spatialColumn'] ? 'selected="selected"' : ''); ?>>
                            <?= htmlspecialchars($value); ?>
                        </option>
                    <?php endforeach; ?>
                </select>
                <input type="hidden" name="displayVisualization" value="redraw">
                    <tr>
                        <td class="choice" colspan="2">
                            <input type="checkbox"
                                   name="visualizationSettings[choice]"
                                   id="choice" value="useBaseLayer"
                                   <?php if (isset($visualizationSettings['choice'])): ?>
                                        checked="checked"
                                   <?php endif; ?>/>
                            <label for="choice" id="labelChoice">
                                <?= __("Use OpenStreetMaps as Base Layer"); ?>
                            </label>
                        </td>
                    </tr>
                <?= PMA\libraries\Util::getStartAndNumberOfRowsPanel($sql_query); ?>
            </form>

            <div class="pma_quick_warp" style="width: 50px; position: absolute; right: 0; top: 0; cursor: pointer;">
                <div class="drop_list">
                    <span class="drop_button" style="padding: 0; border: 0;">
                        <?= PMA\libraries\Util::getImage('b_saveimage', __('Save')); ?>
                    </span>
                    <ul>
                        <li class="warp_link">
                            <a href="<?= $downloadUrl , '&fileFormat=png'; ?>" class="disableAjax">PNG</a>
                        </li>
                        <li class="warp_link">
                            <a href="<?= $downloadUrl , '&fileFormat=pdf'; ?>" class="disableAjax">PDF</a>
                        </li>
                        <li class="warp_link">
                            <a href="<?= $downloadUrl , '&fileFormat=svg'; ?>" class="disableAjax">SVG</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>

        <div style="clear:both;">&nbsp;</div>

        <div id="placeholder"
             style="width:<?= htmlspecialchars($visualizationSettings['width']); ?>px;height:<?= htmlspecialchars($visualizationSettings['height']); ?>px;">
            <?= $visualization; ?>
        </div>
        <div id="openlayersmap"></div>
        <input type="hidden" id="pmaThemeImage" value="<?= $GLOBALS['pmaThemeImage']; ?>" />
        <script language="javascript" type="text/javascript">
            function drawOpenLayers()
            {
                    <?= $drawOl; ?>
            }
        </script>
    </fieldset>
</div>
